Dew Stats for .NET
|
Single moving average.
Parameters |
Description |
[In] TVec Y |
Sample data. |
[In] int N |
Number of elements in period. |
[In] TVec M |
Smoothed data. |
out int Index |
Index of first value in smoothed data. |
[In] bool Centered |
If true, a centered moving average is perfomed. |
MSE.
Performs single moving average smoothing on data Y. General equation for moving average smoothing is:
where N indicates number of points in period and X.Length data sample size. When using single moving average smoothing, bear in mind that when used as forecasts for the next period, single moving average is not able to cope with a significant trend.
Load sample time series, perform centered moving average smoothing with period 12 (yearly average) and finally plot the results using TChart.
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
|
What do you think about this topic? Send feedback!
|